import config from './config.js'
import store from '@/store/index.js'
import moment from 'moment'


const PmServiceRepairJdStatus = (name) => {
	if (name === "APPLYING") {
		return "申请中"
	} else if (name === "WAIT") {
		return "待接单"
	} else if (name === "PROCESSING") {
		return "处理中"
	} else if (name === "EVALUATE") {
		return "待评价"
	} else if (name === "COMPLETE") {
		return "已完成"
	} else if (name === "CANCEL") {
		return "取消"
	}

	return name
}

const PiLookingRoomJdStatus = (name) => {
	if (name === "APPLYING") {
		return "待预约"
	} else if (name === "APPLYED") {
		return "待受理"
	} else if (name === "BOOKING_SUCCESS") {
		return "待看房"
	} else if (name === "BOOKING_FAIL") {
		return "预约拒绝"
	} else if (name === "COMPLETE") {
		return "已看房"
	} else if (name === "CANCEL") {
		return "取消"
	}

	return name
}



const PiPayNoticeStatus = (name) => {
	if (name === "CUSTOMER_CONFIRM") {
		return "待确认"
	} else if (name === "TO_PAY") {
		return "待付款"
	} else if (name === "FINANCE_CONFIRM") {
		return "待对账"
	} else if (name === "COMPLETE") {
		return "已缴费"
	} else if (name === "APPEAL") {
		return "账单申诉"
	} else if (name === "APPEAL_ACCEPT") {
		return "申诉已受理"
	} else if (name === "CANCEL") {
		return "已销账"
	} else if (name === "BAD_DEBTS") {
		return "坏账处理"
	}

	return name
}

const FeedbackStatus = (name) => {
	if (name === "DRAFT") {
		return "草稿"
	} else if (name === "ACCEPT") {
		return "受理中"
	} else if (name === "HANDLE") {
		return "处理中"
	} else if (name === "EVALUATE") {
		return "待评价"
	} else if (name === "CHECK") {
		return "待抽查"
	} else if (name === "CHECKED") {
		return "已抽查"
	} else if (name === "COMPLETE") {
		return "已完成"
	} else if (name === "CANCEL") {
		return "已取消"
	}
	return name
}

const sortAreas = () => {
	return [{
		name: "50平以下",
		value: "1-50"
	},{
		name: "50-100平",
		value: "50-100"
	},{
		name: "100-200平",
		value: "100-200"
	},{
		name: "200-500平",
		value: "200-500"
	},{
		name: "500-1000平",
		value: "500-1000"
	},{
		name: "1000平以上",
		value: "1000-999999"
	}]
}


const sortStoreys = () => {
	return [{
		name: "楼层",
		value: "0"
	},{
		name: "1-10F",
		value: "1-10"
	},{
		name: "11-20F",
		value: "11-20"
	},{
		name: "21-30F",
		value: "21-30"
	},{
		name: "31-40F",
		value: "31-40"
	}]
}


const sortMoneys = () => {
	return [{
		name: "1千元以下",
		value: "1-1000"
	},{
		name: "1千-5千元",
		value: "1000-5000"
	},{
		name: "5千-1万元",
		value: "5000-10000"
	},{
		name: "1万元以上",
		value: "10000-999999999"
	}]
}

module.exports = {
	PiLookingRoomJdStatus,
	PmServiceRepairJdStatus,
	PiPayNoticeStatus,
	FeedbackStatus,
	sortAreas,
	sortStoreys,
	sortMoneys
};
